package tau.dimes.config.ipGeo;

public class IpGeoProvider
{
	private String name;
	private String server;
	private String table;
	private String latitudeColumn;
	private String longitudeColumn;
	private String whereClause;

	public String getName()
	{
		return name;
	}

	public void setName(String name)
	{
		this.name = name;
	}

	public String getServer()
	{
		return server;
	}

	public void setServer(String server)
	{
		this.server = server;
	}

	public String getTable()
	{
		return table;
	}

	public void setTable(String table)
	{
		this.table = table;
	}

	public String getLatitudeColumn()
	{
		return latitudeColumn;
	}

	public void setLatitudeColumn(String latitudeColumn)
	{
		this.latitudeColumn = latitudeColumn;
	}

	public String getLongitudeColumn()
	{
		return longitudeColumn;
	}

	public void setLongitudeColumn(String longitudeColumn)
	{
		this.longitudeColumn = longitudeColumn;
	}

	public String getWhereClause()
	{
		return whereClause;
	}

	public void setWhereClause(String whereClause)
	{
		this.whereClause = whereClause;
	}

	public String getSql()
	{
		return String.format("SELECT %s, %s FROM %s WHERE %s LIMIT 1", latitudeColumn,
			longitudeColumn, table, whereClause);
	}
}
